package cn.itcast.dao;

import cn.itcast.bean.Users;
import cn.itcast.utils.JdbcUtils;

public class UserDao {
	
	public void adduser(Users u) {
		String sql = "insert into bbsusers(id,name,password,email,birthday) values(?,?,?,?,?)";
		JdbcUtils.add(sql, u.getId(), u.getName(), u.getPassword(), u.getEmail(), u.getBirthday());
	}
	
	public void updateuser() {
		
	}
	
	public void deleteuser() {
		
	}
	
	public void finduser(Users u) {
		String sql = "select * from bbsusers where name = ? and password = ?";
		JdbcUtils.find(sql,u.getName(),u.getPassword());
	
	}
}
